<!--[if lt IE 8]>
<div class="alert alert-danger" style="margin-bottom: 0">您正在使用 <strong>过时的</strong> 浏览器. 是时候 <a target="_blank" href="http://browsehappy.com/">更换一个更好的浏览器</a> 来提升用户体验.</div>
<![endif]-->
<!-- HTML-->

<div id="top_bar" class="top_bar" style="display:none">
    <div class="container">
        <div class="row  ">
            <if condition="is_login()">
                <else/>
                <div class="col-xs-6 text-center visible-xs">
                    <a href="{:U('Home/User/login')}" style="padding-top: 10px;display: block;font-size: 16px;color: #ccc !important;">登录</a>
                </div>
                <div class="col-xs-6 text-center visible-xs">
                    <a href="{:U('Home/User/register')}" style="padding-top: 10px;display: block;font-size: 16px;color: #ccc!important;">注册</a>
                </div>
            </if>
            <div class="col-md-6 col-sm-6 hidden-xs">
               <if condition="C('SHARE_WEIBO_ID') neq ''"> 分享<a class="share_weibo" id="weibo_shareBtn" target="_blank"></a>
                   <script>
                       $(function () {
                           weiboShare();//处理微博分享
                       })
                   </script>
               </if>
            </div>
            <div class="col-md-6 col-xs-12  text-right top_right">

                <ul class="nav navbar-nav navbar-right">
                    <!-- <li>
                         &lt;!&ndash;换肤功能预留&ndash;&gt;
                        <a>换肤</a>
                        &lt;!&ndash;换肤功能预留end&ndash;&gt;
                    </li>-->
                    <!--登陆面板-->
                    <if condition="is_login()">
                        
                        <li>
                            <a style="margin-right: 15px;" title="修改资料" href="{:U('Usercenter/Config/index')}"><i
                                    class="glyphicon glyphicon-cog"></i></a>
                        </li>
                        <li class="top_spliter hidden-xs"></li>
                        <li class="dropdown">
                            <!--php>
                                //$common_header_user = query_user(array('nickname'));
                            </php-->
                            <a role="button" class="dropdown-toggle dropdown-toggle-avatar" data-toggle="dropdown">
                                {$common_header_user.nickname}&nbsp;<i style="font-size: 12px"
                                                                       class="glyphicon glyphicon-chevron-down"></i>
                            </a>
                            <ul class="dropdown-menu text-left" role="menu">
                                <li><a href="{:U('UserCenter/Index/index')}"><span
                                        class="glyphicon glyphicon-user"></span>&nbsp;&nbsp;个人主页</a>
                                </li>
                                <li><a href="{:U('Usercenter/message/message')}"><span
                                        class="glyphicon glyphicon-star"></span>&nbsp;&nbsp;消息中心</a>
                                </li>
                                <li><a href="{:U('Usercenter/Collection/index')}"><span
                                        class="glyphicon glyphicon-star"></span>&nbsp;&nbsp;我的收藏</a>
                                </li>

                                <li><a href="{:U('Usercenter/Index/rank')}"><span
                                        class="glyphicon glyphicon-star"></span>&nbsp;&nbsp;我的头衔</a>
                                </li>
                                {:hook('personalMenus')}
                                <if condition="is_administrator()">
                                    <li><a href="{:U('Admin/Index/index')}" target="_blank"><span
                                            class="glyphicon glyphicon-dashboard"></span>&nbsp;&nbsp;管理后台</a></li>
                                </if>
                                <li><a event-node="logout"><span
                                        class="glyphicon glyphicon-off"></span>&nbsp;&nbsp;注销</a>
                                </li>
                            </ul>
                        </li>
                        <li class="top_spliter hidden-xs"></li>
                        <else/>
                        <li class="top_spliter hidden-xs"></li>
                        <li class="hidden-xs">
                            <a href="{:U('Home/User/login')}">登录</a>
                        </li>
                        <li class="hidden-xs">
                            <a href="{:U('Home/User/register')}">注册</a>
                        </li>
                        <li class="spliter hidden-xs"></li>
                    </if>
                </ul>
            </div>
        </div>
    </div>
</div>
<div id="logo_bar" class="logo_bar  hidden-xs" style="background: #ffffff;">
    <div class="container">
        <div class="row logo" style="position:relative">
            <div style="position:absolute;left:0px">
			 <php>$logo = get_cover(modC('LOGO',0,'Config'),'path');
                $logo = $logo?$logo:'__ROOT__/Public/images/logo.png';
             </php>
                <a href="{:U('Home/Index/index')}"><img src="{$logo}" style="max-width:100%;max-height:100%"/></a>
            </div>
            
            <div style="position:absolute;right:10px">

                           <ul class="loginregister">
						   <li style="margin-left:30px"><a href="#" app-data-toggle="popover" title="<b>扫码下载官方APP</b>" data-placement="bottom" data-content=""> <span class="icons icon-app"></span><p>客户端</p></a></li>
						   <if condition="is_login()">
						   		  <li><a href="{:U('Cart/Index/index')}"> <span class="icons icon-cart"></span><p>购物车</p></a></li>
								  <li><a href="{:U('Home/User/logout')}"> <span class="icons icon-logout"></span><p>退出</p></a></li>						   
						          <li><a href="{:U('UserCenter/Config/index')}"> <span class="icons icon-login"></span><p>会员中心</p></a></li>
                           <else/>
						   		  <li><a href="{:U('Cart/Index/index')}"> <span class="icons icon-cart"></span><p>购物车</p></a></li>
                                  <li><a href="{:U('Home/User/register')}"> <span class="icons icon-zhuce"></span><p>注册</p></a></li>
                                  <li><a href="{:U('Home/User/login')}"> <span class="icons icon-login"></span><p>登录</p></a></li>
						   </if>
                           </ul>

            </div>
        </div>
    </div>
</div>
<nav class="navbar navbar-fixed-top" style="display:none">
  <div class="container">
  <!-- navbar-header -->
    <div class="navbar-header">
	  <a class="navbar-brand" href="#">Project Name</a>
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      
    </div>
    <!-- navbar-nav -->
    <div id="navbar" class="navbar-collapse collapse">
      <ul class="nav navbar-nav">
        <li class="active"><a href="#">Home</a></li>
        <li><a href="#features">Features</a></li>
        <li><a href="#about_me">About me</a></li>
      </ul>
    </div>
  </div>
</nav>
<div id="nav_bar" class="nav_bar " style="margin-bottom:15px;display:block">
    <nav class="container" id="nav_bar_container" role="navigation">
	
	<!--导航栏菜单项-->

        <div class="row visible-xs">
            <div class="navbar-header">
			    <a class="navbar-brand" href="/" style="color:#ffffff;line-height:30px;font-size:16px;font-weight:bold">{:modC('WEB_SITE_NAME','','Config')}</a>
                <button type="button" class="navbar-toggle  collapsed" data-toggle="collapse" data-target="#nav_bar_main">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
				
            </div>
        </div>
        <div class="collapse navbar-collapse " id="nav_bar_main">
		
            <ul class="nav navbar-nav  " style="font-size: 16px;margin:0px;padding:0px">
                <think:nav name="nav">
                    <eq name="nav.pid" value="0">
                        <php>
                            $children=D('Channel')->where(array('pid'=>$nav['id']))->order('sort asc')->select();
                            if($children){
                        </php>
                        <li class="dropdown">
                            <a class="dropdown-toggle nav_item" data-toggle="dropdown" href="#" style="color:{$nav.color}">

                                {$nav.title} <span class="caret"></span><neq name="nav.band_text" value="" > <span class="badge" style="background: {$nav.band_color}">{$nav.band_text}</span></neq>
                            </a>
                            <ul class="dropdown-menu">
                                <volist name="children" id="subnav">
                                    <li role="presentation"><a role="menuitem" tabindex="-1" style="color:{$subnav.color}"
                                                               href="{$subnav.url|get_nav_url}"
                                                               target="<eq name='subnav.target' value='1'>_blank<else/>_self</eq>">{$subnav.title}<neq name="subnav.band_text" value="" >  <span class="badge" style="background: {$subnav.band_color}">{$subnav.band_text}</span></neq></a>
                                    </li>
                                </volist>
                            </ul>
                        </li>
                        <php>}else{</php>
                        <li class="<eq name='nav.url|get_nav_active' value='1'>active<else/></eq>">
                            <a href="{$nav.url|get_nav_url}"
                               target="<eq name='nav.target' value='1'>_blank<else/>_self</eq>" style="color:{$nav.color}">{$nav.title}<neq name="nav.band_text" value="" >  <span class="badge" style="background: {$nav.band_color}">{$nav.band_text}</span></neq></a>
                        </li>
                        <php>}</php>
                    </eq>
                </think:nav>
				<if condition="is_login()">
				                  <li class="visible-xs"><a href="{:U('UserCenter/Config/index')}">会员中心</a></li>
								  <li class="visible-xs"><a href="{:U('Home/User/logout')}">退出</a></li>	
						   		  <li class="visible-xs"><a href="{:U('Cart/Index/index')}">购物车</a></li>
								  				   
						          
                <else/>
				                  <li class="visible-xs"><a href="{:U('Home/User/login')}">登录</a></li>
				                  <li class="visible-xs"><a href="{:U('Home/User/register')}">注册</a></li>
						   		  <li class="visible-xs"><a href="{:U('Cart/Index/index')}">购物车</a></li>
                                  
                                  
				</if>
            </ul>

        </div>

        


    </nav>
</div>
<a id="goTopBtn"></a>
<div id="app_content_wrapper" style="display:none;">
  <div style="padding:0px;width:500px">
          <div style="width:150px;float:left;text-align:center;line-height:30px"><img src="{:get_cover(modC('APP_ANDROID_QRCODE',1,'Config'),'path')}" style="max-width:100%;max-height:100%"/><br>android版<br></div>
	 <div style="width:150px;float:left;text-align:center;line-height:30px"><img src="{:get_cover(modC('APP_IOS_QRCODE',1,'Config'),'path')}" style="max-width:100%;max-height:100%"/><br>ios版<br></div>
  </div>
</div>
<script type="text/javascript">

$(function(){
  $("*[transitionparent]").hover(function(){ 
     $(this).find("*[transition]").stop().transition({perspective: '500px',rotateY: 180});
  }, 
  function(){ 
     //$(this).transition({rotateY: 180});
	 $(this).find("*[transition]").stop().transition({perspective: '500px',rotateY: 0});
  }) 
  $("[app-data-toggle='popover']").popover({
                 html : true,
				 trigger: 'hover',
                 content: function() {
                   return $('#app_content_wrapper').html();
                 }
				 
  }).on("show.bs.popover", function () { $(this).data("bs.popover").tip().css("max-width", "330px"); });;
 
});
</script>